package com.we823.cms.common.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class FileUtil {
	public static String getDatePath(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
        Date date = new Date();
        try{
            String sDateTime = sdf.format(date);
            return sDateTime;
        }catch (Exception e) {
            return null;
        }
    }

    public static String getFilename(String filename){
        if(filename!=null && filename.length()>0) {
            String subfix = filename.substring(filename.lastIndexOf("."), filename.length()).toLowerCase();
            return DateUtil.getFullDateString()+subfix;
        }
        return null;
    }
}
